package cn.brilliantfuture.commentry.entity;

// Generated 2012-8-20 13:35:08 by Hibernate Tools 3.3.0.GA

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.validator.Length;
import org.hibernate.validator.NotNull;

/**
 * RechargeCardStateRecord generated by hbm2java
 */
@Entity
@Table(name = "recharge_card_state_record", catalog = "cabinet")
public class RechargeCardStateRecord implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private Integer rechargeCardStateRecordId;
	private RechargeCard rechargeCard;
	private int cardState;
	private String person;
	private Date insertTime;

	public RechargeCardStateRecord() {
	}

	public RechargeCardStateRecord(RechargeCard rechargeCard, int cardState,
			String person, Date insertTime) {
		this.rechargeCard = rechargeCard;
		this.cardState = cardState;
		this.person = person;
		this.insertTime = insertTime;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "recharge_card_state_record_id", unique = true, nullable = false)
	public Integer getRechargeCardStateRecordId() {
		return this.rechargeCardStateRecordId;
	}

	public void setRechargeCardStateRecordId(Integer rechargeCardStateRecordId) {
		this.rechargeCardStateRecordId = rechargeCardStateRecordId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "recharge_card_id", nullable = false)
	@NotNull
	public RechargeCard getRechargeCard() {
		return rechargeCard;
	}

	public void setRechargeCard(RechargeCard rechargeCard) {
		this.rechargeCard = rechargeCard;
	}

	@Column(name = "card_state", nullable = false)
	public int getCardState() {
		return this.cardState;
	}

	public void setCardState(int cardState) {
		this.cardState = cardState;
	}

	@Column(name = "person", nullable = false, length = 50)
	@NotNull
	@Length(max = 50)
	public String getPerson() {
		return this.person;
	}

	public void setPerson(String person) {
		this.person = person;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "insert_time", nullable = false, length = 19)
	@NotNull
	public Date getInsertTime() {
		return this.insertTime;
	}

	public void setInsertTime(Date insertTime) {
		this.insertTime = insertTime;
	}

}
